package com.my.chapter15;

public class practice30 {
    public static void main(String[] args) {
        Holder<Integer> hi = new Holder<Integer>(6);
        hi.set(1);
        int i = hi.get();
        System.out.println(i == 1);
        Holder<Byte> hb = new Holder<Byte>((byte) 6);
        hb.set((byte)1);
        byte b = hb.get();
        System.out.println(b == 1);
        Holder<Short> hs = new Holder<Short>((short)6);
        hs.set((short)1);
        short s = hs.get();
        System.out.println(s == 1);
        Holder<Long> hl = new Holder<Long>((long)6);
        hl.set(1L);
        long l = hl.get();
        System.out.println(l == 1);
        Holder<Float> hf = new Holder<Float>(6.0f);
        hf.set(1.0F);
        float f = hf.get();
        System.out.println(f == 1.0F);
        Holder<Double> hd = new Holder<Double>(6.0);
        hd.set(1.0);
        double d = hd.get();
        System.out.println(d == 1.0);
        Holder<Character> hc = new Holder<Character>('c');
        hc.set('A');
        char c = hc.get();
        System.out.println(c == 'A');
        Holder<Boolean> hbool = new Holder<Boolean>(true);
        hbool.set(true);
        boolean bool = hbool.get();
        System.out.println(bool);
    }
}
